---
apiVersion: helm.toolkit.fluxcd.io/v2
kind: HelmRelease
metadata:
  name: metrics-server
spec:
  interval: 30m
  chart:
    spec:
      chart: metrics-server
      version: 3.12.1
      sourceRef:
        kind: HelmRepository
        name: metrics-server
        namespace: flux-system
  install:
    remediation:
      retries: 3
  upgrade:
    cleanupOnFail: true
    remediation:
      retries: 3
  values:
    args:
      - --kubelet-preferred-address-types=InternalIP,ExternalIP,Hostname
      - --kubelet-use-node-status-port
      - --metric-resolution=15s
    metrics:
      enabled: true
    serviceMonitor:
      enabled: true
